<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>

<style type="text/css">
.error {
	color: #ff0000;
	font-weight: bold;
}

table {
	width: 750px;
	border-collapse: collapse;
	text-align: center;
	font-family: 'Trebuchet MS';
}

td,th {
	font-size: 10pt;
	border: 1px solid #96aae3;
	height: 30px;
}

th {
	background-color: #5075dd; /* 테이블 배경색 */
	color: #ffffff; /*  글씨색깔  */
	font-family: Georgia;
}

tr.alt td {
	color: #000000;
	background-color: #EAF2D3;
}

.t1 {
	border: #000000 solid;
	border-width: 1px 0px 1px 0px
}

.bt_view {
	background-color: #8099de;
	border: 1px solid #999;
	width: 80px;
	height: 18px;
	border-radius: 8px;
	border: none;
	margin: 0 0 0 5px;
	font-weight: bold;
	font-size: 0.9em;
	color: #FFF;
	background-image: url(../images/member/dup.jpg);
	background-repeat: repeat-x;
	background-position: center center;
}
</style>


<h1 align="center">
	<c:choose>
		<c:when test="${board[0].boardId == 1 }">
	공지사항
	</c:when>
		<c:when test="${board[0].boardId == 2 }">
	채용정보
	</c:when>
		<c:when test="${board[0].boardId == 3 }">
	질의 응답
	</c:when>
		<c:otherwise>
	세부내용
	</c:otherwise>
	</c:choose>

</h1>

<table border="1">
	<tr>
		<th>번호</th>
		<td>${content.num }</td>
		<th>작성자</th>
		<td>${content.name }</td>
		<th>아이디</th>
		<td>${content.id }</td>
		<th>작성날짜</th>
		<td>${content.logTime }</td>
	</tr>
	<tr>
		<th>제목</th>
		<td colspan="5">${content.subject }</td>
		<th>조회수</th>
		<td>${content.hit }</td>

		<!--  <td><input type="submit" onclick="remove?memberName=${guest.name }" value="삭제" /></td>-->
		<!-- <td><a href="remove?memberName=${guest.name }">remove</a></td> -->
	</tr>
	<tr>
		<th colspan="8" align="center">내 용</th>
	</tr>
	<tr>
		<td colspan="8">${content.content }</td>
	</tr>

</table>
<p>
<form method="get" action="./"
	style="padding: 0; margin: 0; width: 250px; display: inline;">
	<input name="boardType" type="hidden" value="${content.boardId }" /> <input
		name="boardPage" type="hidden" value="${boardPage }" /> <input
		type="submit" value="목록보기" class="bt_view" />
</form>
<sec:authorize ifAllGranted="ROLE_EMPLOYEE">
	<c:if test="${content.boardId == 3 }">
	
		<form style="padding: 0; margin: 0; width: 250px; display: inline;"
			method="post" action="<c:url value="/board/boardAnswer"/>">
			<input name="memberId" type="hidden"
				value="<sec:authentication property="name" />" /> <input
				name="subject" type="hidden" value="${content.subject }" /> <input
				name="answerNum" type="hidden" value="${content.num }" /> <input
				type="submit" value="답변" class="bt_view" />
		</form>
		
	</c:if>
	<form style="padding: 0; margin: 0; width: 250px; display: inline;"
		method="post" action="<c:url value="/board/boardUpdate"/>">
		<input name="boardSeq" type="hidden" value="${content.boardSeq }" />
		<input type="submit" value="수정" class="bt_view" />
	</form>
	<form style="padding: 0; margin: 0; width: 250px; display: inline;"
		method="post" action="<c:url value="/board/boardRemove"/>">
		<input name="boardSeq" type="hidden" value="${content.boardSeq }" />
		<input name="boardType" type="hidden" value="${content.boardId }" />
		<input type="submit" value="삭제" class="bt_view" />
	</form>
</sec:authorize>